State-of-the-art stellarator optimization code
This tutorial will walk the user through running BOOZ_XFORM on the free boundary equilibrium generated in the VMEC Free Boundary Tutorial. For this example the National Compact Stellarator Experiment (NCSX) configuration will be used. This machine is stellarator symmetric with a periodicity of three.
The input file (in_booz.ncsx_c09r00_free) controls the execution of the BOOZ_XFORM code. The suffix of the input file will be appended to each of the output files as we will see after execution. Our input file looks something like
72 24
'ncsx_c09r00_free'
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
To execute the code simply pass the name of the in_booz file to the executable.
>~/bin_847/xbooz_xform in_booz.ncsx_c09r00_free
0 <= mboz <= 71 -24 <= nboz <= 24
nu_boz = 290 nv_boz = 98
OUTBOARD (u=0) JS INBOARD (u=pi)
-----------------------------------------------------------------------------
v |B|vmec |B|booz Error |B|vmec |B|booz Error
0 1.496E+00 1.496E+00 1.381E-14 2 1.526E+00 1.526E+00 3.157E-14
pi 1.498E+00 1.498E+00 3.113E-15 1.524E+00 1.524E+00 3.336E-14
0 1.485E+00 1.485E+00 1.496E-15 3 1.538E+00 1.538E+00 3.841E-14
pi 1.488E+00 1.488E+00 1.194E-14 1.534E+00 1.534E+00 3.301E-14
0 1.477E+00 1.477E+00 1.037E-14 4 1.545E+00 1.545E+00 3.434E-14
pi 1.480E+00 1.480E+00 2.115E-14 1.540E+00 1.540E+00 3.850E-14
0 1.471E+00 1.471E+00 4.982E-15 5 1.552E+00 1.552E+00 3.878E-14
pi 1.474E+00 1.474E+00 2.877E-14 1.545E+00 1.545E+00 3.923E-14
0 1.465E+00 1.465E+00 1.333E-14 6 1.557E+00 1.557E+00 2.966E-14
pi 1.469E+00 1.469E+00 2.449E-14 1.549E+00 1.549E+00 3.239E-14
0 1.461E+00 1.461E+00 1.186E-14 7 1.562E+00 1.562E+00 8.527E-16
pi 1.464E+00 1.464E+00 3.306E-14 1.553E+00 1.553E+00 8.291E-15
0 1.456E+00 1.456E+00 2.851E-14 8 1.567E+00 1.567E+00 1.601E-14
pi 1.460E+00 1.460E+00 4.092E-14 1.557E+00 1.557E+00 4.435E-14
0 1.452E+00 1.452E+00 2.507E-14 9 1.571E+00 1.571E+00 3.674E-14
pi 1.455E+00 1.455E+00 5.432E-14 1.560E+00 1.560E+00 9.562E-14
0 1.449E+00 1.449E+00 2.407E-14 10 1.576E+00 1.576E+00 8.555E-14
pi 1.451E+00 1.451E+00 9.593E-14 1.564E+00 1.564E+00 1.779E-13
0 1.445E+00 1.445E+00 2.996E-14 11 1.579E+00 1.579E+00 1.227E-13
pi 1.448E+00 1.448E+00 1.235E-13 1.567E+00 1.567E+00 2.674E-13
0 1.442E+00 1.442E+00 6.022E-14 12 1.583E+00 1.583E+00 1.811E-13
pi 1.444E+00 1.444E+00 1.958E-13 1.570E+00 1.570E+00 3.872E-13
0 1.439E+00 1.439E+00 9.276E-14 13 1.587E+00 1.587E+00 2.461E-13
pi 1.440E+00 1.440E+00 2.517E-13 1.572E+00 1.572E+00 4.947E-13
0 1.436E+00 1.436E+00 1.420E-13 14 1.590E+00 1.590E+00 3.259E-13
pi 1.437E+00 1.437E+00 3.656E-13 1.575E+00 1.575E+00 6.623E-13
0 1.433E+00 1.433E+00 1.777E-13 15 1.594E+00 1.594E+00 3.772E-13
pi 1.434E+00 1.434E+00 4.911E-13 1.578E+00 1.578E+00 8.268E-13
0 1.430E+00 1.430E+00 2.607E-13 16 1.597E+00 1.597E+00 4.400E-13
pi 1.431E+00 1.431E+00 6.533E-13 1.580E+00 1.580E+00 1.001E-12
0 1.428E+00 1.428E+00 3.350E-13 17 1.600E+00 1.600E+00 4.995E-13
pi 1.428E+00 1.428E+00 8.321E-13 1.583E+00 1.583E+00 1.161E-12
0 1.425E+00 1.425E+00 4.383E-13 18 1.603E+00 1.603E+00 4.998E-13
pi 1.425E+00 1.425E+00 1.041E-12 1.586E+00 1.586E+00 1.327E-12
0 1.423E+00 1.423E+00 5.640E-13 19 1.607E+00 1.607E+00 5.318E-13
pi 1.422E+00 1.422E+00 1.262E-12 1.588E+00 1.588E+00 1.446E-12
0 1.421E+00 1.421E+00 6.918E-13 20 1.610E+00 1.610E+00 5.167E-13
pi 1.419E+00 1.419E+00 1.518E-12 1.590E+00 1.590E+00 1.541E-12
0 1.418E+00 1.418E+00 8.262E-13 21 1.613E+00 1.613E+00 4.557E-13
pi 1.416E+00 1.416E+00 1.777E-12 1.593E+00 1.593E+00 1.608E-12
0 1.416E+00 1.416E+00 9.729E-13 22 1.616E+00 1.616E+00 3.790E-13
pi 1.414E+00 1.414E+00 2.045E-12 1.595E+00 1.595E+00 1.639E-12
0 1.414E+00 1.414E+00 1.134E-12 23 1.619E+00 1.619E+00 3.010E-13
pi 1.411E+00 1.411E+00 2.282E-12 1.598E+00 1.598E+00 1.636E-12
0 1.413E+00 1.413E+00 1.294E-12 24 1.622E+00 1.622E+00 1.962E-13
pi 1.409E+00 1.409E+00 2.503E-12 1.600E+00 1.600E+00 1.669E-12
0 1.411E+00 1.411E+00 1.449E-12 25 1.624E+00 1.624E+00 1.003E-13
pi 1.406E+00 1.406E+00 2.698E-12 1.602E+00 1.602E+00 1.720E-12
0 1.409E+00 1.409E+00 1.618E-12 26 1.627E+00 1.627E+00 3.739E-14
pi 1.404E+00 1.404E+00 2.853E-12 1.605E+00 1.605E+00 1.860E-12
0 1.407E+00 1.407E+00 1.808E-12 27 1.630E+00 1.630E+00 3.487E-14
pi 1.402E+00 1.402E+00 2.933E-12 1.607E+00 1.607E+00 2.171E-12
0 1.406E+00 1.406E+00 1.982E-12 28 1.633E+00 1.633E+00 1.001E-13
pi 1.399E+00 1.399E+00 2.963E-12 1.609E+00 1.609E+00 2.719E-12
0 1.404E+00 1.404E+00 2.186E-12 29 1.636E+00 1.636E+00 2.525E-13
pi 1.397E+00 1.397E+00 2.864E-12 1.611E+00 1.611E+00 3.594E-12
0 1.403E+00 1.403E+00 2.350E-12 30 1.638E+00 1.638E+00 5.204E-13
pi 1.395E+00 1.395E+00 2.691E-12 1.614E+00 1.614E+00 4.938E-12
0 1.401E+00 1.401E+00 2.463E-12 31 1.641E+00 1.641E+00 9.444E-13
pi 1.393E+00 1.393E+00 2.399E-12 1.616E+00 1.616E+00 6.873E-12
0 1.400E+00 1.400E+00 2.520E-12 32 1.644E+00 1.644E+00 1.579E-12
pi 1.391E+00 1.391E+00 1.979E-12 1.618E+00 1.618E+00 9.529E-12
0 1.398E+00 1.398E+00 2.425E-12 33 1.647E+00 1.647E+00 2.453E-12
pi 1.389E+00 1.389E+00 1.461E-12 1.620E+00 1.620E+00 1.308E-11
0 1.397E+00 1.397E+00 2.144E-12 34 1.649E+00 1.649E+00 3.603E-12
pi 1.387E+00 1.387E+00 8.154E-13 1.623E+00 1.623E+00 1.770E-11
0 1.396E+00 1.396E+00 1.674E-12 35 1.652E+00 1.652E+00 5.160E-12
pi 1.385E+00 1.385E+00 4.392E-14 1.625E+00 1.625E+00 2.356E-11
0 1.395E+00 1.395E+00 9.829E-13 36 1.655E+00 1.655E+00 7.180E-12
pi 1.383E+00 1.383E+00 8.418E-13 1.627E+00 1.627E+00 3.094E-11
0 1.394E+00 1.394E+00 8.732E-14 37 1.657E+00 1.657E+00 9.856E-12
pi 1.381E+00 1.381E+00 1.811E-12 1.630E+00 1.630E+00 4.010E-11
0 1.392E+00 1.392E+00 9.949E-13 38 1.660E+00 1.660E+00 1.320E-11
pi 1.380E+00 1.380E+00 2.947E-12 1.632E+00 1.632E+00 5.116E-11
0 1.391E+00 1.391E+00 2.167E-12 39 1.663E+00 1.663E+00 1.745E-11
pi 1.378E+00 1.378E+00 4.172E-12 1.634E+00 1.634E+00 6.460E-11
0 1.390E+00 1.390E+00 3.307E-12 40 1.665E+00 1.665E+00 2.263E-11
pi 1.376E+00 1.376E+00 5.521E-12 1.636E+00 1.636E+00 8.067E-11
0 1.389E+00 1.389E+00 4.258E-12 41 1.668E+00 1.668E+00 2.898E-11
pi 1.375E+00 1.375E+00 6.940E-12 1.639E+00 1.639E+00 9.985E-11
0 1.389E+00 1.389E+00 4.928E-12 42 1.670E+00 1.670E+00 3.639E-11
pi 1.373E+00 1.373E+00 8.531E-12 1.641E+00 1.641E+00 1.221E-10
0 1.388E+00 1.388E+00 5.274E-12 43 1.673E+00 1.673E+00 4.496E-11
pi 1.372E+00 1.372E+00 1.024E-11 1.643E+00 1.643E+00 1.480E-10
0 1.387E+00 1.387E+00 5.223E-12 44 1.676E+00 1.676E+00 5.458E-11
pi 1.370E+00 1.370E+00 1.204E-11 1.645E+00 1.645E+00 1.777E-10
0 1.386E+00 1.386E+00 4.936E-12 45 1.678E+00 1.678E+00 6.519E-11
pi 1.369E+00 1.369E+00 1.396E-11 1.648E+00 1.648E+00 2.113E-10
0 1.385E+00 1.385E+00 4.597E-12 46 1.681E+00 1.681E+00 7.658E-11
pi 1.367E+00 1.367E+00 1.596E-11 1.650E+00 1.650E+00 2.488E-10
0 1.385E+00 1.385E+00 4.528E-12 47 1.683E+00 1.683E+00 8.874E-11
pi 1.366E+00 1.366E+00 1.808E-11 1.652E+00 1.652E+00 2.903E-10
0 1.384E+00 1.384E+00 5.070E-12 48 1.686E+00 1.686E+00 1.015E-10
pi 1.365E+00 1.365E+00 2.027E-11 1.655E+00 1.655E+00 3.357E-10
0 1.383E+00 1.383E+00 6.593E-12 49 1.688E+00 1.688E+00 1.149E-10
pi 1.364E+00 1.364E+00 2.256E-11 1.657E+00 1.657E+00 3.850E-10
0 1.383E+00 1.383E+00 9.321E-12 50 1.691E+00 1.691E+00 1.291E-10
pi 1.362E+00 1.362E+00 2.490E-11 1.660E+00 1.660E+00 4.381E-10
0 1.382E+00 1.382E+00 1.331E-11 51 1.694E+00 1.694E+00 1.447E-10
pi 1.361E+00 1.361E+00 2.725E-11 1.662E+00 1.662E+00 4.965E-10
0 1.381E+00 1.381E+00 1.856E-11 52 1.696E+00 1.696E+00 1.612E-10
pi 1.360E+00 1.360E+00 2.976E-11 1.664E+00 1.664E+00 5.577E-10
0 1.381E+00 1.381E+00 2.470E-11 53 1.699E+00 1.699E+00 1.795E-10
pi 1.359E+00 1.359E+00 3.238E-11 1.667E+00 1.667E+00 6.234E-10
0 1.381E+00 1.381E+00 3.111E-11 54 1.701E+00 1.701E+00 1.994E-10
pi 1.358E+00 1.358E+00 3.504E-11 1.669E+00 1.669E+00 6.921E-10
0 1.380E+00 1.380E+00 3.712E-11 55 1.704E+00 1.704E+00 2.208E-10
pi 1.357E+00 1.357E+00 3.769E-11 1.672E+00 1.672E+00 7.634E-10
0 1.380E+00 1.380E+00 4.201E-11 56 1.706E+00 1.706E+00 2.434E-10
pi 1.356E+00 1.356E+00 4.022E-11 1.674E+00 1.674E+00 8.363E-10
0 1.379E+00 1.379E+00 4.510E-11 57 1.709E+00 1.709E+00 2.670E-10
pi 1.355E+00 1.355E+00 4.255E-11 1.677E+00 1.677E+00 9.102E-10
0 1.379E+00 1.379E+00 4.588E-11 58 1.712E+00 1.712E+00 2.910E-10
pi 1.354E+00 1.354E+00 4.448E-11 1.679E+00 1.679E+00 9.838E-10
0 1.379E+00 1.379E+00 4.407E-11 59 1.714E+00 1.714E+00 3.148E-10
pi 1.353E+00 1.353E+00 4.577E-11 1.682E+00 1.682E+00 1.056E-09
0 1.378E+00 1.378E+00 3.950E-11 60 1.717E+00 1.717E+00 3.379E-10
pi 1.353E+00 1.353E+00 4.612E-11 1.684E+00 1.684E+00 1.126E-09
0 1.378E+00 1.378E+00 3.224E-11 61 1.719E+00 1.719E+00 3.597E-10
pi 1.352E+00 1.352E+00 4.520E-11 1.687E+00 1.687E+00 1.192E-09
0 1.378E+00 1.378E+00 2.233E-11 62 1.722E+00 1.722E+00 3.799E-10
pi 1.351E+00 1.351E+00 4.261E-11 1.689E+00 1.689E+00 1.252E-09
0 1.378E+00 1.378E+00 9.926E-12 63 1.724E+00 1.724E+00 3.977E-10
pi 1.350E+00 1.350E+00 3.793E-11 1.692E+00 1.692E+00 1.304E-09
0 1.378E+00 1.378E+00 4.935E-12 64 1.727E+00 1.727E+00 4.128E-10
pi 1.350E+00 1.350E+00 3.079E-11 1.695E+00 1.695E+00 1.346E-09
0 1.378E+00 1.378E+00 2.214E-11 65 1.729E+00 1.729E+00 4.250E-10
pi 1.349E+00 1.349E+00 2.098E-11 1.697E+00 1.697E+00 1.374E-09
0 1.378E+00 1.378E+00 4.184E-11 66 1.732E+00 1.732E+00 4.341E-10
pi 1.348E+00 1.348E+00 8.541E-12 1.700E+00 1.700E+00 1.387E-09
0 1.378E+00 1.378E+00 6.408E-11 67 1.734E+00 1.734E+00 4.399E-10
pi 1.347E+00 1.347E+00 5.965E-12 1.702E+00 1.702E+00 1.380E-09
0 1.378E+00 1.378E+00 8.872E-11 68 1.737E+00 1.737E+00 4.425E-10
pi 1.347E+00 1.347E+00 2.147E-11 1.705E+00 1.705E+00 1.350E-09
0 1.378E+00 1.378E+00 1.151E-10 69 1.739E+00 1.739E+00 4.421E-10
pi 1.346E+00 1.346E+00 3.599E-11 1.708E+00 1.708E+00 1.297E-09
0 1.378E+00 1.378E+00 1.421E-10 70 1.742E+00 1.742E+00 4.394E-10
pi 1.345E+00 1.345E+00 4.670E-11 1.710E+00 1.710E+00 1.219E-09
0 1.378E+00 1.378E+00 1.672E-10 71 1.744E+00 1.744E+00 4.356E-10
pi 1.345E+00 1.345E+00 4.983E-11 1.713E+00 1.713E+00 1.121E-09
0 1.378E+00 1.378E+00 1.868E-10 72 1.747E+00 1.747E+00 4.328E-10
pi 1.344E+00 1.344E+00 4.096E-11 1.716E+00 1.716E+00 1.008E-09
0 1.378E+00 1.378E+00 1.960E-10 73 1.749E+00 1.749E+00 4.333E-10
pi 1.343E+00 1.343E+00 1.548E-11 1.718E+00 1.718E+00 8.883E-10
0 1.378E+00 1.378E+00 1.890E-10 74 1.752E+00 1.752E+00 4.408E-10
pi 1.342E+00 1.342E+00 3.063E-11 1.721E+00 1.721E+00 7.790E-10
0 1.378E+00 1.378E+00 1.597E-10 75 1.754E+00 1.754E+00 4.607E-10
pi 1.342E+00 1.342E+00 1.002E-10 1.723E+00 1.723E+00 7.037E-10
0 1.379E+00 1.379E+00 1.026E-10 76 1.756E+00 1.756E+00 4.987E-10
pi 1.341E+00 1.341E+00 1.929E-10 1.726E+00 1.726E+00 6.859E-10
0 1.379E+00 1.379E+00 1.350E-11 77 1.758E+00 1.758E+00 5.610E-10
pi 1.340E+00 1.340E+00 3.044E-10 1.729E+00 1.729E+00 7.498E-10
0 1.379E+00 1.379E+00 1.098E-10 78 1.761E+00 1.761E+00 6.551E-10
pi 1.339E+00 1.339E+00 4.278E-10 1.731E+00 1.731E+00 9.293E-10
0 1.379E+00 1.379E+00 2.675E-10 79 1.763E+00 1.763E+00 7.890E-10
pi 1.338E+00 1.338E+00 5.527E-10 1.734E+00 1.734E+00 1.261E-09
0 1.379E+00 1.379E+00 4.561E-10 80 1.765E+00 1.765E+00 9.718E-10
pi 1.337E+00 1.337E+00 6.657E-10 1.737E+00 1.737E+00 1.787E-09
0 1.380E+00 1.380E+00 6.670E-10 81 1.767E+00 1.767E+00 1.211E-09
pi 1.336E+00 1.336E+00 7.522E-10 1.739E+00 1.739E+00 2.541E-09
0 1.380E+00 1.380E+00 8.849E-10 82 1.769E+00 1.769E+00 1.517E-09
pi 1.335E+00 1.335E+00 7.988E-10 1.742E+00 1.742E+00 3.564E-09
0 1.380E+00 1.380E+00 1.088E-09 83 1.771E+00 1.771E+00 1.894E-09
pi 1.334E+00 1.334E+00 7.934E-10 1.744E+00 1.744E+00 4.879E-09
0 1.380E+00 1.380E+00 1.251E-09 84 1.773E+00 1.773E+00 2.348E-09
pi 1.333E+00 1.333E+00 7.284E-10 1.747E+00 1.747E+00 6.515E-09
0 1.380E+00 1.380E+00 1.351E-09 85 1.775E+00 1.775E+00 2.878E-09
pi 1.331E+00 1.331E+00 5.984E-10 1.750E+00 1.750E+00 8.461E-09
0 1.380E+00 1.380E+00 1.373E-09 86 1.777E+00 1.777E+00 3.481E-09
pi 1.330E+00 1.330E+00 4.014E-10 1.752E+00 1.752E+00 1.072E-08
0 1.380E+00 1.380E+00 1.307E-09 87 1.779E+00 1.779E+00 4.150E-09
pi 1.328E+00 1.328E+00 1.336E-10 1.755E+00 1.755E+00 1.325E-08
0 1.380E+00 1.380E+00 1.162E-09 88 1.781E+00 1.781E+00 4.872E-09
pi 1.327E+00 1.327E+00 2.062E-10 1.757E+00 1.757E+00 1.602E-08
0 1.380E+00 1.380E+00 9.490E-10 89 1.782E+00 1.782E+00 5.621E-09
pi 1.325E+00 1.325E+00 6.261E-10 1.760E+00 1.760E+00 1.890E-08
0 1.380E+00 1.380E+00 6.914E-10 90 1.784E+00 1.784E+00 6.365E-09
pi 1.323E+00 1.323E+00 1.136E-09 1.762E+00 1.762E+00 2.178E-08
0 1.380E+00 1.380E+00 4.127E-10 91 1.786E+00 1.786E+00 7.067E-09
pi 1.322E+00 1.322E+00 1.749E-09 1.765E+00 1.765E+00 2.450E-08
0 1.380E+00 1.380E+00 1.451E-10 92 1.787E+00 1.787E+00 7.672E-09
pi 1.320E+00 1.320E+00 2.479E-09 1.767E+00 1.767E+00 2.682E-08
0 1.380E+00 1.380E+00 7.666E-11 93 1.789E+00 1.789E+00 8.102E-09
pi 1.318E+00 1.318E+00 3.336E-09 1.769E+00 1.769E+00 2.837E-08
0 1.380E+00 1.380E+00 2.057E-10 94 1.790E+00 1.790E+00 8.254E-09
pi 1.316E+00 1.316E+00 4.309E-09 1.772E+00 1.772E+00 2.868E-08
0 1.380E+00 1.380E+00 2.038E-10 95 1.791E+00 1.791E+00 7.978E-09
pi 1.314E+00 1.314E+00 5.352E-09 1.774E+00 1.774E+00 2.704E-08
0 1.379E+00 1.379E+00 7.909E-11 96 1.793E+00 1.793E+00 7.026E-09
pi 1.312E+00 1.312E+00 6.419E-09 1.777E+00 1.777E+00 2.232E-08
0 1.379E+00 1.379E+00 6.602E-11 97 1.794E+00 1.794E+00 5.047E-09
pi 1.309E+00 1.309E+00 7.557E-09 1.779E+00 1.779E+00 1.297E-08
0 1.379E+00 1.379E+00 6.481E-11 98 1.795E+00 1.795E+00 1.240E-09
pi 1.308E+00 1.308E+00 9.150E-09 1.781E+00 1.781E+00 4.472E-09
0 1.379E+00 1.379E+00 2.040E-10 99 1.796E+00 1.796E+00 6.216E-09
pi 1.306E+00 1.306E+00 1.174E-08 1.784E+00 1.784E+00 3.757E-08
TIME IN BOOZER TRANSFORM CODE: 3.12E+02 SEC
>
For this example three files were created (boozmn.ncsx_c09r00_free, RZ_BOOZER_VPLANE 1.txt, and RZ_VMEC_VPLANE 1.txt). The RZ files contain a set of points defining the VMEC and BOOZER boundaries respectively. The boozmn file contains the output from the BOOZ_XFORM code. Examination of the netCDF file shows it has the following format
netcdf boozmn_ncsx_c09r00_free {
dimensions:
dim_00038 = 38 ;
radius = 99 ;
comput_surfs = 98 ;
mn_mode = 3504 ;
mn_modes = 3504 ;
pack_rad = 98 ;
variables:
int nfp_b ;
int ns_b ;
double aspect_b ;
double rmax_b ;
double rmin_b ;
double betaxis_b ;
int mboz_b ;
int nboz_b ;
int mnboz_b ;
char version(dim_00038) ;
int lasym__logical__ ;
double iota_b(radius) ;
double pres_b(radius) ;
double beta_b(radius) ;
double phip_b(radius) ;
double phi_b(radius) ;
double bvco_b(radius) ;
double buco_b(radius) ;
int jlist(comput_surfs) ;
int ixm_b(mn_mode) ;
int ixn_b(mn_mode) ;
double bmnc_b(pack_rad, mn_modes) ;
double rmnc_b(pack_rad, mn_modes) ;
double zmns_b(pack_rad, mn_modes) ;
double pmns_b(pack_rad, mn_modes) ;
double gmn_b(pack_rad, mn_modes) ;
}